<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>hook_example</title>
    <script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>
</head>
<body style="height: 1500px;">
    <div id="app" v-demo="{ color: 'white', text: 'hello!' }">
    </div>
    <script>
        Vue.directive('demo', function(el, binding){
            console.log(binding.value.color);
            console.log(binding.value.text);
        });
        new Vue({
            el: '#app'
        });
    </script>
</body>
</html>
